﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Commons.Web;
using System.IO;
using VCommons;
using EF.Commons.Background.Entity;
namespace Common.Background.Web.Controllers
{
    public abstract class ControllerBase : BaseController
    {
        public ControllerBase()
        {
            Background_Current_UserID = string.IsNullOrEmpty(SessionAction.ReadSession("Background_Current_UserID"))
                ? -new Random().Next(2, 99999)
                : Convert.ToInt32(SessionAction.ReadSession("Background_Current_UserID"));
            Background_Current_UserName = SessionAction.ReadSession("Background_Current_UserName");

        }
        /// <summary>
        /// 用户权限：后台
        /// </summary>
        protected virtual UserOperatorRole UserOperatorRole { get; set; }
        /// <summary>
        /// 当前的用户ID：后台
        /// </summary>
        protected virtual int Background_Current_UserID { get; set; }

        /// <summary>
        /// 当前登陆的用户名：后台
        /// </summary>
        protected virtual string Background_Current_UserName { get; set; }
    }
}
